package org.farng.mp3.lyrics3;

import org.farng.mp3.InvalidTagException;
import org.farng.mp3.object.ObjectBooleanString;

import java.io.RandomAccessFile;


/**
 * Title: Description: Copyright:    Copyright (c) 2002 Company:
 *
 * @author Eric Farng
 * @version $Revision: 1.2 $
 */
public class FieldBodyIND extends AbstractLyrics3v2FieldBody {
    /**
     * Creates a new FieldBodyIND object.
     */
    public FieldBodyIND() {
        //        this.setObject("Lyrics Present", new Boolean(false));
        //        this.setObject("Timestamp Present", new Boolean(false));
    }

    public FieldBodyIND(FieldBodyIND body) {
        super(body);
    }

    /**
     * Creates a new FieldBodyIND object.
     *
     * @param lyricsPresent DOCUMENT ME!
     * @param timeStampPresent DOCUMENT ME!
     */
    public FieldBodyIND(boolean lyricsPresent, boolean timeStampPresent) {
        this.setObject("Lyrics Present", new Boolean(lyricsPresent));
        this.setObject("Timestamp Present", new Boolean(timeStampPresent));
    }

    /**
     * Creates a new FieldBodyIND object.
     *
     * @param file DOCUMENT ME!
     *
     * @throws InvalidTagException DOCUMENT ME!
     * @throws java.io.IOException DOCUMENT ME!
     */
    public FieldBodyIND(RandomAccessFile file)
                 throws InvalidTagException, java.io.IOException {
        this.read(file);
    }

    /**
     * DOCUMENT ME!
     *
     * @param author DOCUMENT ME!
     */
    public void setAuthor(String author) {
        setObject("Author", author);
    }

    /**
     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public String getAuthor() {
        return (String) getObject("Author");
    }

    /**
     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public String getIdentifier() {
        return "IND";
    }

    /**
     * DOCUMENT ME!
     */
    protected void setupObjectList() {
        objectList.add(new ObjectBooleanString("Lyrics Present"));
        objectList.add(new ObjectBooleanString("Timestamp Present"));
    }
}